package com.fastloan.mgt.invest.service.impl;

import com.fastloan.common.BasicServiceImpl;
import com.fastloan.mgt.invest.dao.InvestFromMapper;
import com.fastloan.mgt.invest.model.InvestFrom;
import com.fastloan.mgt.invest.model.count.AnswerDetail;
import com.fastloan.mgt.invest.service.InvestFromService;
import com.kawins.supers.table.manager.DataTable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author rankai
 *         createTime 2017-08-2017/8/8 10:31
 */
@Service
public class InvestFromServiceImpl extends BasicServiceImpl<InvestFrom> implements InvestFromService {

    @Autowired
    private InvestFromMapper investFromMapper;

    @Override
    @DataTable(name = "investFromPageList")
    public List<InvestFrom> investFromPageList(Map<String, Object> map) {
        return investFromMapper.investFromPageList(map);
    }

    @Override
    public List<AnswerDetail> questdetaions(String subjectId, String topOrgId) {
        Map<String, Object> map = new HashMap<>();
        map.put("subjectId", subjectId);
        map.put("topOrgId", topOrgId);
        return investFromMapper.questdetaions(map);
    }
}
